#pragma once

class SCRGame;

namespace SCRMouseButton
{
	typedef int Enum;
	const Enum LEFT = 1;
	const Enum MIDDLE = 2;
	const Enum RIGHT = 3;
}

class SCRMouse
{
public:

	static const int SCR_MOUSE_BUTTON_BITS = 2;
	static const int SCR_MOUSE_BUTTON_SIZE = (1 << SCR_MOUSE_BUTTON_BITS); 
	static const int SCR_MOUSE_BUTTON_MASK = SCR_MOUSE_BUTTON_SIZE - 1;

	static bool IsPressed(const SCRMouseButton::Enum& Button);
	static bool IsReleased(const SCRMouseButton::Enum& Button);
	static bool IsClicked(const SCRMouseButton::Enum& Button);
	static int GetX();
	static int GetY();

	friend class SCRGame;

private:

	static void InitializeState();
	static void UpdateState();

	static bool mCurrentStateA[SCR_MOUSE_BUTTON_SIZE];
	static bool mPreviousStateA[SCR_MOUSE_BUTTON_SIZE];
	static int m_X;
	static int m_Y;
};

inline int SCRMouse::GetX()
{
	return m_X;
}

inline int SCRMouse::GetY()
{
	return m_Y;
}
